package net.adetech.dcweb.core.dc.service;

import com.alibaba.fastjson.JSONArray;
import net.adetech.dcweb.core.dc.entity.DcAlarm;
import net.adetech.dcweb.core.dc.entity.DcData;

import java.sql.Timestamp;
import java.util.List;

/**
 * Created by sunfeihu on 2016/10/20.
 */
public interface IDcAlarmService {

    /**
     * 增加单条数据
     *
     * @param entity 要增加的实体
     */
    DcAlarm save(DcAlarm entity);


    void save(JSONArray array);

    /**
     * 修改单条数据
     *
     * @param entity 要修改的实体
     */
    int update(DcAlarm entity);

    /**
     * 查询单条数据
     *
     * @param id 数据主键ID
     */
    DcAlarm find(Long id);

    /**
     * 设置为已读
     *
     * @param id
     */
    void read(Long id, Long adminuserId);


    List<DcData> list(Integer isRead, Long adminuserId);

    List<DcData> list(Integer isRead, Long adminuserId, Timestamp start,Timestamp end);


    void check();


}